//
//  AreaViewController.m
//  界面切换使用storyboard
//
//  Created by wukeng on 16/2/22.
//  Copyright © 2016年 wukeng. All rights reserved.
//

#import "AreaViewController.h"
#import "SummaryViewController.h"
extern int count;
@interface AreaViewController ()
@property (weak, nonatomic) IBOutlet UITextField *length;

@property (weak, nonatomic) IBOutlet UITextField *width;

@property (weak, nonatomic) IBOutlet UITextField *rectangleArea;

@property (weak, nonatomic) IBOutlet UITextField *radius;

@property (weak, nonatomic) IBOutlet UITextField *circleArea;

@property (weak, nonatomic) SummaryViewController *summaryVC;
@end

@implementation AreaViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
- (IBAction)didClickBtn {
    float recArea = [self.length.text floatValue]*[self.width.text floatValue];
    float cirArea = [self.radius.text floatValue]*[self.radius.text floatValue]*M_PI;
    [self.rectangleArea setText:[NSString stringWithFormat:@"%.1f",recArea]];
    [self.circleArea setText:[NSString stringWithFormat:@"%.1f",cirArea]];
    count++;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
